import React, { Component } from 'react';
import { Tabs, Form, Icon, Input, Button, Row, Col } from 'antd';
import { head } from '../../../resource';

const { TabPane } = Tabs;

@Form.create()
class ChooseCompany extends Component {
  constructor(props) {
    super(props);
    this.state = {
      key: 1,
    };
  }

  componentDidMount() {}

  componentWillUnmount() {}

  render() {
    const { getFieldDecorator } = this.props.form;
    const { key } = this.state;
    const lists = [
      {
        key: '1',
        url: head,
        name: '广州市科技发展有限',
      },
      {
        key: '2',
        url: head,
        name: '广州市科技发展有限公司公司',
      },
      {
        key: '3',
        url: head,
        name: '广州市科技发展有限公司公司',
      },
      {
        key: '4',
        url: head,
        name: '广州市科技发展有限公司公司',
      },
      {
        key: '5',
        url: head,
        name: '广州市科技发展有限公司公司',
      },
      {
        key: '6',
        url: head,
        name: '广州市科技发展有限公司公司',
      },
    ];

    return (
      <div className={'CCCss'}>
        <h1>登录成功，选择已有企业进入</h1>
        <div>
          {lists.map((item, idx) => {
            const names =
              item.name && item.name.length > 12
                ? `${item.name.slice(0, 12)}...`
                : item.name;
            return (
              <div
                className={'companyList'}
                key={'com_' + idx}
                title={item.name}
              >
                <img
                  src={item.url}
                  alt=""
                  style={{ width: '32px', height: '32px' }}
                />
                <span>{names}</span>
              </div>
            );
          })}
        </div>
      </div>
    );
  }
}

export default ChooseCompany;
